PROGS = db_tools

FN_LINKS = db_connect.oct db_close.oct db_query.oct db_update.oct db_help.oct

all: clean java $(PROGS) $(FN_LINKS) 

java: ;javac -classpath lib/ogsadai-core.jar *.java

$(FN_LINKS):
	ln -s db_tools.oct $@

$(PROGS):
	mkoctfile -I/opt/java/include -I/opt/java/include/linux -I/home/gtonic/workspace/octave_xml \
	OGSADAIConnection.cpp -ljava $@.cc -o $@.oct -L/opt/java/jre/lib/i386 -L/opt/java/jre/lib/i386/client \
	-ljava -lverify -ljvm -loctavexml

clean: ;-$(RM) *.class $(PROGS); $(RM) -r html latex *.log *.oct *.o octave-core core

doxygen: ; doxygen doxygen.conf

tests: ; octave -q --funcall test/runtests
